<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">
		<title>订单查询</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<style type="text/css">
		.actived{color:red;}
		</style>
		<%@ include file="/WEB-INF/jspf/taglibs.jspf"%>
		<%@ include file="/WEB-INF/jspf/statics.jspf"%>
	</head>
<body>
		<%@include file="/WEB-INF/pages/common/header.jsp" %>
		<%@include file="/WEB-INF/pages/common/menu.jsp" %>
		<div id="rightqqqq" style="float:left;width:88%;height:10px;margin-left:4px;min-height:80%;overflow-y:auto; overflow-x:hidden; ">
					<div style="float: left; width: 99%; height: auto; min-height: 100%; border-left-style:groove;">
			<!--div-958 start-->
			<div class="div-958" style="margin-top: 0px; width: 100%">
				<div style="width: 100%;" class="container clearfix w942">
					<div style="width: 100%;" class="cont bl0">
									<div class="title clearfix" style="margin-bottom: 10px;">
                            			<h2>订单记录查询</h2>
                       			 	</div>
                        <div class="content">
                            <form id="searchForm" style="padding-bottom:20px;"
                                  onsubmit="fnValidate('#startOrderTime','#endOrderTime');$('#dataTable').refreshData();return false;">
                                <ul>
                                     <li style="float:left;">
                                        <table>
                                            <tr>
                                                <td style="padding-left:10px;font-size:12px;">订票方式：</td>
                                                <td>
                                                    <select name="internetTrading" id="internetTrading" class="free form-control1">
                                                        <option value="9" selected>所有状态</option>
                                                        <option value="1">网上购票</option>
                                                        <option value="2">现场购票</option>
                                                    </select>
                                                </td>
                                            </tr>
                                        </table>
                                    </li>
                                    <li style="float:left">
                                        <table>
                                            <tr>
                                                <td style="padding-left:20px;font-size:12px;">订单状态：</td>
                                                <td>
                                                    <select name="orderStatus" id="orderStatus" class="free form-control1">
                                                        <option value="9" selected>所有状态</option>
                                                        <option value="1">成功</option>
                                                        <option value="2">失败</option>
                                                        <option value="3">未支付</option>
                                                    </select>
                                                </td>
                                            </tr>
                                        </table>
                                    </li>
                                    <li style="float:left">
                                        <div class="input-prepend">
                                            <span class="" style="padding-left:20px;">下单时间：</span>
                                            <input type="text" name="startOrderTime" id="startOrderTime" style="width: 200px;"
                                                   class="form-control text">
                                        </div>
                                    </li>
                                    <li style="float:left">
                                        <div class="input-prepend">
                                            <span class="arrive">至</span>
                                        </div>
                                    </li>
                                    <li style="float:clear;">
                                        <div class="input-prepend">
                                            <span class="" style="padding-left:15px;">下单时间：</span>
                                            <input type="text" name="endOrderTime" id="endOrderTime" style="width: 200px;"
                                                   class="form-control text">
                                        </div>
                                    </li><br/>
                                    <li style="float: left ;">
                                        <div class="input-prepend">
                                            <span style="padding-left:10px;">预约号：</span>
                                            <input type="text" name="scheduleNum" id="scheduleNum"
                                                   class="form-control text" style="width:200px;">
                                        </div>
                                    </li>
                                    <li style="float:left">
                                        <div class="input-prepend">
                                            <span class="" style="padding-left:14px;">参观时间：</span>
                                            <input type="text" name="startVisitTime" id="startVisitTime" style="width: 200px;"
                                                   class="form-control text">
                                        </div>
                                    </li>
                                    <li style="float:left">
                                        <div class="input-prepend">
                                            <span class="arrive">至</span>
                                        </div>
                                    </li>
                                     <li style="float:left;margin-right:20px;">
                                        <div class="input-prepend">
                                            <span class="" style="padding-left:10px;">参观时间：</span>
                                            <input type="text" name="endVisitTime" id="endVisitTime" style="width: 200px;"
                                                   class="form-control text">
                                        </div>
                                    </li>
                                     
                                    <li style="margin-left: 650px; line-height: 10px; height: 30px; margin-top:-10px;">
                                        <div>
                                            <input type="button" class="btn btn-primary" style="width:150px;" value="搜索" id="btn-primary" onclick="search()"/>
                                        </div>
                                    </li>
                                </ul>
                            </form>
                            <div class="orderResults" ng-show="orderForm .searchFlag">
                                <div class="table-toolbar pusht">
                                    <div class="btn-group right toggle-content">
                                        <a class="" href="#">
                                        	    更改列显示
                                        </a>
                                        <div class="dropdown-menu twin-cols-dropdown-menu" id="column-edit-01"></div>
                                    </div>
                                </div>
                                <div id="dataTable_wrapper" class="dataTables_wrapper" role="grid" >
                                    <div class="top">
                                        <div class="dataTables_info" id="dataTable_info">查询结果</div>
                                    </div>
                                    <table id="dataTable" class="dataTable" aria-describedby="dataTable_info">
                                        <thead>
                                        <tr role="row">
                                        	<th class="sorting_disabled" role="columnheader" rowspan="1" colspan="1">订单号</th>
                                            <th class="sorting_disabled" role="columnheader" rowspan="1" colspan="1">预约号</th>
                                            <th class="sorting_disabled" role="columnheader" rowspan="1" colspan="1">票务类型编号</th>
                                            <th class="sorting_disabled" role="columnheader" rowspan="1" colspan="1">下单时间</th>
                                            <th class="sorting_disabled" role="columnheader" rowspan="1" colspan="1">预约参观时间</th>
                                            <th class="sorting_disabled" role="columnheader" rowspan="1" colspan="1">预订票数</th>
                                            <th class="sorting_disabled" role="columnheader" rowspan="1" colspan="1">订单金额</th>
                                            <th class="sorting_disabled" role="columnheader" rowspan="1" colspan="1">订单状态</th>
                                            <th class="sorting_disabled" role="columnheader" rowspan="1" colspan="1">下单方式</th>
                                            <th class="sorting_disabled" role="columnheader" rowspan="1" colspan="1">联系人姓名</th>
                                            <th class="sorting_disabled" role="columnheader" rowspan="1" colspan="1">联系人证件号</th>
                                            <th class="sorting_disabled" role="columnheader" rowspan="1" colspan="1">联系人手机</th>
                                        </tr>
                                        </thead>
                                        <tbody role="alert" aria-live="polite" aria-relevant="all">
                                        </tbody>
                                    </table>
                                </div>
         
                            </div>
                        </div>
								</div>
							</div>
						</div>
					</div>
				</div>
	</body>
</html>
<%-- <script type="text/javascript" src="<%=basePath %>/js/jquery.plugins.js"></script>
<script type="text/javascript"
	src="<%=basePath%>js/jquery.dataTables.min.js"></script>
<script type="text/javascript"
	src="<%=basePath%>js/jquery.dataTables.init.js"></script> --%>
<script type="text/javascript" src="<%=basePath %>/js/ui/jquery-ui-1.10.3.datepicker_zh_CN.js"></script>
<script type="text/javascript" src="<%=basePath %>/js/ui/jquery-ui-timepicker-addon.js"></script>
<%-- <script type="text/javascript" src="<%=basePath%>/js/ui/jquery-ui-1.10.3.custom.min.js"></script> --%>
<script type="text/javascript">
	$().ready(function(){
		$('#navigation').accordion({
			header: '.head',
			navigation1: true, 
			event: 'click',
			autoHeight:true,
			active:0,
			animated: 'bounceslide'
		});
		$("a[class='actived']").removeAttr("class");
		$("#searchOrder").attr("class", "actived");
		$("#currentPosition").text("当前位置：票务管理 > 定单管理");
	});
    $(document).ready(function () {
     	$("#startOrderTime").datepicker().val();
        $("#endOrderTime").datepicker().val();
        $("#startVisitTime").datepicker().val();
        $("#endVisitTime").datepicker().val();
        search();
    })
    function search() {
    	$(".dropdown-menu").empty();
        	$(".toggle-content").hover(function () {
            $(this).find(".dropdown-menu").show();
        }, function () {
            $(this).find(".dropdown-menu").hide();
        });
        $("#dataTable").dataTables({
            "sAjaxSource": "${ctx }/order/search_order",
            "fnServerData": function (sSource, aoData, fnCallback) {
             	var postData = aoData.concat($("#searchForm").serializeArray());
                $.post(sSource, postData,function (json) {
                    fnCallback(json.data);
                }, "json");
            },
            "aoColumns": [
            	{
                    "sName": "order_no", "mDataProp": "orderNo", "bSortable": false
                },
            	{
                    "sName": "schedule_num", "mDataProp": "scheduleNum", "bSortable": false
                },
                {
                    "sName": "ticket_no", "mDataProp": "ticketNo", "bSortable": false
                },
                {
                    "sName": "order_time", "mDataProp": "orderTimeStr", "bSortable": false
                },
                {
                    "sName": "visit_time", "mDataProp": "visitTimeStr", "bSortable": false
                },
                {
                    "sName": "ticket_count", "mDataProp": "ticketCount", "bSortable": false
                },
                {
                    "sName": "order_price", "mDataProp": "orderPrice", "bSortable": false
                },
                {
                    "mDataProp": function (aData, type, val) {
                        switch (aData.type) {
                            case 1:
                                val = "<span style='color: balck'>成功</span>";
                                break;
                            case 2:
                                val = "<span style='color: balck'>失败</span>";
                                break;
                            case 3:
                            	val="<span style='color: balck'>预约</span>";
                            default:
                            	val="<span style='color: balck'>预约</span>";
                        }
                        return val;
                    }, "sName": "order_status", "bSortable": false
                },
                {
                    "mDataProp": function (aData, type, val) {
                        switch (aData.type) {
                            case 1:
                                val = "<span style='color: balck'>网上购票</span>";
                                break;
                            case 2:
                                val = "<span style='color: balck'>现场购票</span>";
                                break;
                            default:
                            	val="<span style='color: balck'>现场购票</span>";
                        }
                        return val;
                    }, "sName": "internet_trading", "bSortable": false
                },
                {
                    "sName": "linkman_name", "mDataProp": "linkmanName", "bSortable": false
                },
                {
                    "sName": "linkman_ID", "mDataProp": "linkmanID", "bSortable": false
                },
                {
                    "sName": "linkman_phone", "mDataProp": "linkmanPhone", "bSortable": false
                }
            ]
        });
         $("#dataTable").columnManager({"listTargetID": "column-edit-01"});
    }
</script>